package com.darren.euc.initial;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import com.darren.euc.service.SystemService;

/**
 * <pre>
 * *********************************************
 * Copyright AIAIT CS TEAM.
 * All rights reserved.
 * Description: system parameter initial data in cache
 * HISTORY:
 * *********************************************
 *  Version		Date		Author	   Desc	
 *   v1.0     Jul 22, 2013    Jason Huang    Create

 * *********************************************
 * </pre>
 */

public class InitialSystemParameter implements InitializingBean,DisposableBean {
	
	private Logger log = Logger.getLogger(InitialSystemParameter.class);
	
	@Resource
	private SystemService systemService;

	public void afterPropertiesSet() throws Exception {
		log.info("begin initial system parameter in cache......");
		systemService.initalSystemParameter();
		log.info("end initial system parameter in cache completed......");
		
		log.info("begin initial screen token in cache......");
		systemService.getScreenToken();
		log.info("end initial screen token in cache completed......");
	}

	public void destroy() throws Exception {
		
	}

}
